]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
background: destroy actors don't remove them from their parent
authorRay Strode <rstrode@redhat.com>
Wed, 20 Feb 2013 02:50:40 +0000 (21:50 -0500)
committerRay Strode <rstrode@redhat.com>
Wed, 20 Feb 2013 02:54:01 +0000 (21:54 -0500)
This reads better, and it also fixes a warning when background
is changed while transitioning to the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=694227

js/ui/background.js

index 9d79e434b99bc6f6e7a619d71d6f15b0e2b81b8a..8d2a9cce12523b240a0b5a5d1573e15fa07e1418 100644 (file)
@@ -664,16 +664,12 @@ const BackgroundManager = new Lang.Class({
             this.background.disconnect(this._changedSignalId);
 
         if (this._newBackground) {
-            let container = this._newBackground.actor.get_parent();
-            if (container)
-                container.remove_actor(this._newBackground.actor);
+            this._newBackground.actor.destroy();
             this._newBackground = null;
         }
 
         if (this.background) {
-            let container = this.background.actor.get_parent();
-            if (container)
-                container.remove_actor(this.background.actor);
+            this.background.actor.destroy();
             this.background = null;
         }
     },
@@ -695,7 +691,7 @@ const BackgroundManager = new Lang.Class({
                                    onComplete: Lang.bind(this, function() {
                                        this.background = newBackground;
                                        this._newBackground = null;
-                                       this._container.remove_actor(background.actor);
+                                       background.actor.destroy();
                                        this.emit('changed');
                                    })
                                  });